import 'package:flutter/material.dart';

class RefreshEmpty extends StatelessWidget {
  /// 展示文字
  final String textDescrip;

  /// 显示图片
  final IconData noMoreImage;
  RefreshEmpty({Key key, this.textDescrip = '没有更多数据', this.noMoreImage = Icons.mood})
      : super(key: key);
  @override
  Widget build(BuildContext context) {
    return Container(
      height: double.infinity,
      child: Column(
        mainAxisAlignment: MainAxisAlignment.center,
        crossAxisAlignment: CrossAxisAlignment.center,
        children: <Widget>[
          Expanded(
            child: SizedBox(),
            flex: 2,
          ),
          SizedBox(
            width: 100.0,
            height: 100.0,
            child: Icon(noMoreImage),
          ),
          Text(
            textDescrip,
            style: TextStyle(fontSize: 16.0, color: Colors.grey[400]),
          ),
          Expanded(
            child: SizedBox(),
            flex: 3,
          ),
        ],
      ),
    );
  }
}
